﻿using System;
using Assets.Scripts.GtsScripts;
using UnityEngine;

// Token: 0x020001E4 RID: 484
public class BEAction : AgentAction
{
	// Token: 0x06000A4F RID: 2639 RVA: 0x0005A64F File Offset: 0x0005884F
	public BEAction(float speed, float duration = 0f)
	{
		this.name = "Breast Expansion: " + speed;
		this.speed = speed;
		this.duration = duration;
		this.stop = (duration == 0f);
	}

	// Token: 0x06000A50 RID: 2640 RVA: 0x0005A689 File Offset: 0x00058889
	public override void StartAction()
	{
		this.startTime = Time.time;
		this.giantess = this.agent.GetComponent<Giantess>();
		this.giantess.StartBreastExpansion();
		this.giantess.SetBeSpeed(this.speed);
	}

	// Token: 0x06000A51 RID: 2641 RVA: 0x0005A6C3 File Offset: 0x000588C3
	public override void UpdateAction()
	{
		if (this.stop)
		{
			return;
		}
		if (Time.time > this.startTime + this.duration)
		{
			this.giantess.SetBeSpeed(0f);
			this.stop = true;
		}
	}

	// Token: 0x06000A52 RID: 2642 RVA: 0x0005A6FF File Offset: 0x000588FF
	public override bool IsCompleted()
	{
		return this.hasStarted && this.stop;
	}

	// Token: 0x06000A53 RID: 2643 RVA: 0x0005A715 File Offset: 0x00058915
	public override void Interrupt()
	{
		if (!this.stop)
		{
			this.giantess.SetBeSpeed(this.speed);
		}
	}

	// Token: 0x04000FA2 RID: 4002
	private float startTime;

	// Token: 0x04000FA3 RID: 4003
	private float duration;

	// Token: 0x04000FA4 RID: 4004
	private float speed;

	// Token: 0x04000FA5 RID: 4005
	private bool stop;

	// Token: 0x04000FA6 RID: 4006
	private Giantess giantess;
}
